package com.zt.chatgpt.domain.images;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.zt.chatgpt.domain.chat.ChatCompletionRequest;
import lombok.*;
import lombok.extern.slf4j.Slf4j;

import java.io.Serializable;

/**
 * @author: zt
 * @Description: 图片请求
 * @create: 2024-05-13 21:24
 */
@Slf4j
@Getter
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
@NoArgsConstructor
@AllArgsConstructor
public class ImageRequest extends ImageEnum implements Serializable {
    /** 问题描述 */
    @NonNull
    private String prompt;

    /** 默认模型 */
    @Builder.Default
    private String model = Model.DALL_E_3.getCode();

    /** 为每个提示生成的完成次数 */
    @Builder.Default
    private Integer n = 1;

    /** 图片大小 */
    @Builder.Default
    private String size = Size.size_1024.getCode();

    /** 图片格式化方式；URL、B64_JSON */
    @JsonProperty("response_format")
    @Builder.Default
    private String responseFormat = ResponseFormat.URL.getCode();

    @Setter
    private String user;

    @Getter
    @AllArgsConstructor
    public enum Model {
        DALL_E_3("dall-e-3"),
        ;
        private String code;
    }
}
